// 登录需要的类型
export interface MemberLoginForm {
    username: string,
    password: string
}

// 登录数据类型
export interface MemberLoginRespDataInfo {
    memberId: number,
    username: string | null,
    memberName: string | null,
    memberType: string | null,
    avatar?: string | null,
    token: string | null
}

// 登录返回类型
export interface MemberLoginRespInfo {
    code: number,
    message: string,
    data: MemberLoginRespDataInfo
}

// 登出返回类型
export interface MemberLogoutResp {
    code: number
}

// 用户信息
export interface MemberInfo {
    username: string
    memberName: string
    password: string | null
    gender?: string
    height?: number
    weight?: number
    BMI?: number
    contact?: string
    memberType: string
    membershipStartDate?: string
    membershipEndDate?: string
    age?: number
    avatar?: string | null
}
export interface MemberInfoResp {
    code: number
    message: string
    data: MemberInfo
}

// 更新用户信息
export interface UpdateMember extends Partial<MemberInfo> {
    memberId: number
}

export interface UpdateMemberResp {
    code: number
    message?: string
    data?: object
}

export interface AddAndEditAdminMember{
    memberId: number
    username: string
    password: string
    gender?: string
    height?: number
    weight?: number
    BMI?: number
    contact?: string
    age?: number
    memberName?: string
}


export interface PageAdminMember{
    memberId: number| null
    username: string
    memberName: string
    memberType: string
    page: number
    pageSize: number
}
export interface AdminMemberInfo extends MemberInfo{
    memberId: number
    registrationTime: string
    lastModifiedTime: string
}
// 分页请求响应数据
interface PageRespInfo{
    total: number
    records: AdminMemberInfo[]
}

// 分页请求响应
export interface PageResp {
    code: number
    message: string
    data: PageRespInfo
}


export interface BuyMember {
    memberId: number
    membershipStartDate: string | null
    membershipEndDate: string | null
    days: number
}

// 重置密码
export interface ResetPassword {
    memberId: number
    oldPassword: string
    newPassword: string
}
// 响应
export interface ResetPasswordResp extends UpdateMemberResp {}

// 注册信息
export interface RegisterInfo {
    username: string
    memberName: string
    password: string
    age?: number
    gender?: string
    contact?: string
}
// 注册响应
export interface RegisterResp extends UpdateMemberResp{}